package org.example.controller;

import cn.lingyangwl.framework.core.response.Resp;
import org.example.config.ExtensionDemoConfig;
import org.example.config.NacosDemoConfig;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author shenguangyang
 */
@RestController
public class Test02Controller {
    @Resource
    private ExtensionDemoConfig extensionDemoConfig;

    @Resource
    private NacosDemoConfig nacosDemoConfig;

    @GetMapping("/t2")
    public Resp<?> t2() {
        System.out.println(extensionDemoConfig.getClass().getSimpleName() + ": " + extensionDemoConfig);
        return Resp.ok();
    }

    @GetMapping("/t3")
    public Resp<?> t3() {
        System.out.println(nacosDemoConfig.getClass().getSimpleName() + ": " + nacosDemoConfig);
        return Resp.ok();
    }
}
